{% comment %}
/* Copyright 2009 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
{% endcomment %}
{% extends 'base.html' %}
{% block content %}
<br>
Unreviewed Comments<br>
<table class="table-list">
  <thead>
    <tr class="table-head">
      <td>Action</td>
      <td>User Email</td>
      <td>Nickname</td>
      <td>Comment</td>
      <td>Approved/Rejected</td>
    </tr>
  </thead>
  <tbody>
{% if unreviewed_comments %}
{% for comment in unreviewed_comments %}
    <tr>
      <td>
        <a
        href='/admin/comments/?comment={{comment.key}}&status=approved'>
        approve
        </a> |
        <a
        href='/admin/comments/?comment={{comment.key}}&status=rejected'>
        reject
        </a>
      </td>
      <td>
        {{comment.author.gia.email}}
      </td>
      <td>
        {{comment.author.nickname}}
      </td>
      <td>
        {{comment.body}}
      </td>
      <td>
        {{comment.approved}} / {{comment.rejected}}
      </td>
    </tr>
{% endfor %}
{% else %}
    <tr>
      <td colspan="5">
        No unreviewed comments.
      </td>
    </tr>
{% endif %}
  </tbody>
</table>
{% endblock %}
